/*
 * Created on October 13, 2007
 *
 * Copyright (c) Patrick Armstrong 2002-2007. All Rights Reserved.
 */
package org.dime.util;

import java.math.BigInteger;

import org.dime.mine.game.Board;

/**
 * BoardUtils // TODO Add type summary
 * 
 * @author Owner
 */
public class BoardUtils
{

    /**
     * 
     */
    public BoardUtils()
    {}

    public static void initializeID(int[][] board)
    {
        BigInteger id = new BigInteger(new byte[] { 0 });
        BigInteger one = new BigInteger(new byte[] { 1 });
        for (int i = 0; i < board.length; i++)
        {
            for (int j = 0; j < board[i].length; j++)
            {
                id = id.shiftLeft(1);
                if (board[i][j] == Board.MINE)
                    id = id.add(one);
            }
        }
    }

}
